package com.team;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Party {
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;
    
	@Persistent
	private String partyname;
	@Persistent
	private String hostPassword;
	@Persistent
	private String guestPassword;
	@Persistent
	private String location;
	@Persistent
	private String hostName;
	@Persistent
	private Date date;
	@Persistent
	private HashMap<String, String> playlist;
	

	
	public Party(String partyname, String hostPassword, String guestPassword, 
			Date date, HashMap <String, String> playlist, String location, String hostName){
		this.partyname = partyname;
		this.hostPassword = hostPassword;
		this.guestPassword = guestPassword;
		this.date = date;
		this.playlist = playlist;
		this.location = location;
		this.hostName = hostName;
	}
	
    public Long getId() {
        return id;
    }
    public String getLocation(){
    	return location;
    }
	
	public String getPartyName(){
		return this.partyname;
	}
	
	public String getHostPassword(){
		return this.hostPassword;
	} 
	public String getGuestPassword(){
		return this.guestPassword;
	}
	
	public Date getDate(){
		return this.date;
	} 
	
	public String getHostName(){
		return this.hostName;
	}
	public void setLocation(String location){
		this.location = location;
	}
	public void setPartyName(String partyname){
		this.partyname = partyname;
		
	}
	
public void setList(String title, String artist){
	playlist.put(title, artist);
}
	
	
	public void setHostPassword(String hostPassword){
		this.hostPassword = hostPassword;
		
	}
	public void setHostName(String hostName){
		this.hostName = hostName;
	}

	public void setGuestPassword(String guestPassword){
		this.guestPassword = guestPassword;
		
	}
	
	public HashMap<String, String> getList(HashMap<String, String> playlist){
		return playlist;
}
	
	
    public void setDate(Date date) {
        this.date = date;
    }
	

}
